/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.fd.service;

import java.util.Collection;
import java.util.List;

import com.xy.biz.fd.domain.bo.FolderBO;
import com.xy.biz.fd.domain.query.FolderQuery;
import com.xy.biz.fd.domain.req.folder.CreateManufactureFolderRequest;
import com.xy.biz.fd.domain.resp.GetFolderResponse;
import com.xy.lang.domain.Result;

/**
 *
 *
 * @author ssl
 * @date 2021-1-23
 */
public interface FolderService {

	/**
	 * 保存
	 *
	 * @param folderBO
	 */
	Result<GetFolderResponse> saveFolder(FolderBO folderBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	Result<?> saveAllFolder(Collection<FolderBO> collection);

	/**
	 * 更新
	 *
	 * @param folderBO
	 */
	Result<?> updateFolder(FolderBO folderBO);

	/**
	 * 删除
	 *
	 * @param folderId
	 */
	Result<?> deleteFolder(Long folderId);

	/**
	 * 批量删除文件夹
	 *
	 * @param folderIds
	 */
	Result<?> deleteFolderByIds(Collection<Long> folderIds);

	/**
	 * 查找一个
	 *
	 * @param folderId
	 * @return
	 */
	FolderBO getFolder(Long folderId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<FolderBO> listFolderById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<FolderBO> listFolder(FolderQuery query);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<Object> listFolderDocument(FolderQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countFolder(FolderQuery query);

	/**
	 * 移动文件夹
	 * @param folderBO
	 * @return
	 */
	Result<?> updateMoveFolder(FolderBO folderBO);

	/**
	 * 重命名文件夹名称
	 * @param folderBO
	 * @return
	 */
	Result<?> updateNameFolder(FolderBO folderBO);

	/**
	 * 恢复文件夹
	 * @param folderId
	 * @return
	 */
    Result<?> recoverFolder(Long folderId);

    /**
     * 批量恢复
     *
     * @param folderIds
     */
    Result<?> recoverFolderByIds(Collection<Long> folderIds);

	/**
	 * 获取目录树结构
	 * @param toQuery
	 * @return
	 */
	Result<?> listTreeFolderDocument(FolderQuery toQuery);

    /**
     * 获取文件夹目录结构
     * @param toQuery
     * @return
     */
    Result<?> listTreeFolder(FolderQuery toQuery);

    /**
     * 获取文件夹信息
     * @param folderId
     * @return
     */
    GetFolderResponse getFolderInfoById(Long folderId);

	/**
	 * 获取发行知识库
	 * @param query
	 * @return
	 */
	Result<List<GetFolderResponse>> getRelease(FolderQuery query);

	/**
	 * 复制文件夹
	 * @param folderBO
	 * @return
	 */
	Result<?> copyFolder(FolderBO folderBO);

    Result<GetFolderResponse> createManufacture(CreateManufactureFolderRequest request);
}
